#include<stdio.h>
int Even(int n);
int main()
{   int a;
	scanf("%d",&a);
	printf("%d",Even(a));
	return 0;
}
int Even(int n)
{
	if(n%2==0)
	return 1;
	else
	return 0;
}
